const routes = [
  { path: '/', redirect: '/home' },
  {
    name: 'home',
    path: '/home',
    component: () => import('@/views/Home'),
    meta: {
      isShowNav: true,
    },
  },
  {
    name: 'search',
    path: '/search/:keyword?',
    component: () => import('@/views/Search'),
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/Login'),
    meta: {
      isHiddenFooter: true,
    },
  },
  {
    name: 'register',
    path: '/register',
    component: () => import('@/views/Register'),
    meta: {
      isHiddenFooter: true,
    },
  },
  {
    name: 'detail',
    path: '/detail/:id',
    component: () => import('@/views/Detail'),
    props: true,
  },
  {
    name: 'addcartsuccess',
    path: '/addcartsuccess',
    component: () => import('@/views/AddCartSuccess'),
  },
  {
    name: 'shopcart',
    path: '/shopcart',
    component: () => import('@/views/ShopCart'),
  },
  {
    name: 'pay',
    path: '/pay',
    component: () => import('@/views/Pay'),
  },
  {
    name: 'paysuccess',
    path: '/paysuccess',
    component: () => import('@/views/PaySuccess'),
  },
  {
    name: 'center',
    path: '/center',
    component: () => import('@/views/Center'),
  },
  {
    name: 'trade',
    path: '/trade',
    component: () => import('@/views/Trade'),
  },
]

export default routes
